package com.list01.example01;

import java.security.PublicKey;
import java.util.Scanner;

public class StudentManagerDemo03 {
   Scanner scanner =  new Scanner(System.in);
  StudentService studentService =  new StudentService();

    public static void main(String[] args) {
        StudentManagerDemo03 studentManagerDemo03 = new StudentManagerDemo03();
        studentManagerDemo03.init();
    }
    private  void  init(){
        while (true){
            System.out.println("选择(1.录入)");
            System.out.println("(0.退出)");
            int choice = scanner.nextInt();
            if (choice ==1){
                studentService.add();
            }else if (choice==0){
                studentService.printStudent();
                scanner.close();
                break;
            }
        }
    }
}
